package com.battery.system.domain;

import com.battery.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 收益对象 ws_income
 *
 * @author battery
 * @date 2021-01-22
 */
@Table(name = "ws_income")
public class Income {
    private static final long serialVersionUID = 1L;

    /**
     * 收益iD
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private String id;

    /**
     * 租借记录ID
     */
    @Excel(name = "租借记录ID")
    private String usedId;

    /**
     * 支付订单ID
     */
    @Excel(name = "支付订单ID")
    private String orderId;

    /**
     * 分润总金额
     */
    @Excel(name = "分润总金额")
    private BigDecimal totalAmount;

    /**
     * 项目ID,即平台ID
     */
    @Excel(name = "项目ID,即平台ID")
    private String projectId;

    /**
     * 合作商ID
     */
    @Excel(name = "合作商ID")
    private String partnerId;

    /**
     * 商户ID
     */
    @Excel(name = "商户ID")
    private String merchantId;

    /**
     * 门店ID
     */
    @Excel(name = "门店ID")
    private String storeId;

    /**
     * 分润级别 1 平台 2 合作商 3 商户
     */
    @Excel(name = "分润级别 1 平台 2 合作商 3 商户")
    private Integer shareLevel;

    /**
     * 收益来源 1 收益  2 退款  3 平台抽成 4 平台抽成退款
     */
    @Excel(name = "收益来源 1 收益  2 退款  3 平台抽成 4 平台抽成退款")
    private Integer incomeType;

    /**
     * 分成时间
     */
    private Date shareTime;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    private String userAppId;

    /**
     * 分润比例
     */
    @Excel(name = "分润比例")
    private BigDecimal shareBrokerage;

    /**
     * 分润前金额
     */
    @Excel(name = "分润前金额")
    private BigDecimal beforeMoney;

    /**
     * 分润后金额
     */
    @Excel(name = "分润后金额")
    private BigDecimal afterMoney;


    private BigDecimal shareMoney;

    private String deviceId;

    private String directPartnerId;

    public String getDirectPartnerId() {
        return directPartnerId;
    }

    public void setDirectPartnerId(String directPartnerId) {
        this.directPartnerId = directPartnerId;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setUsedId(String usedId) {
        this.usedId = usedId;
    }

    public String getUsedId() {
        return usedId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }

    public String getPartnerId() {
        return partnerId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setShareLevel(Integer shareLevel) {
        this.shareLevel = shareLevel;
    }

    public Integer getShareLevel() {
        return shareLevel;
    }

    public void setIncomeType(Integer incomeType) {
        this.incomeType = incomeType;
    }

    public Integer getIncomeType() {
        return incomeType;
    }

    public void setShareTime(Date shareTime) {
        this.shareTime = shareTime;
    }

    public Date getShareTime() {
        return shareTime;
    }

    public void setUserAppId(String userAppId) {
        this.userAppId = userAppId;
    }

    public String getUserAppId() {
        return userAppId;
    }

    public void setShareBrokerage(BigDecimal shareBrokerage) {
        this.shareBrokerage = shareBrokerage;
    }

    public BigDecimal getShareBrokerage() {
        return shareBrokerage;
    }

    public void setBeforeMoney(BigDecimal beforeMoney) {
        this.beforeMoney = beforeMoney;
    }

    public BigDecimal getBeforeMoney() {
        return beforeMoney;
    }

    public void setAfterMoney(BigDecimal afterMoney) {
        this.afterMoney = afterMoney;
    }

    public BigDecimal getAfterMoney() {
        return afterMoney;
    }


    public BigDecimal getShareMoney() {
        return shareMoney;
    }

    public void setShareMoney(BigDecimal shareMoney) {
        this.shareMoney = shareMoney;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("usedId", getUsedId())
                .append("orderId", getOrderId())
                .append("totalAmount", getTotalAmount())
                .append("projectId", getProjectId())
                .append("partnerId", getPartnerId())
                .append("merchantId", getMerchantId())
                .append("storeId", getStoreId())
                .append("shareLevel", getShareLevel())
                .append("incomeType", getIncomeType())
                .append("shareTime", getShareTime())
                .append("userAppId", getUserAppId())
                .append("shareBrokerage", getShareBrokerage())
                .append("beforeMoney", getBeforeMoney())
                .append("afterMoney", getAfterMoney())
                .toString();
    }
}
